home *** CD-ROM | disk | FTP | other *** search
/ The Best of MacTutor - S…e Code for Volumes 1 to 5 / The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin / Source Code / #33 (Jun 88) / serial demo / Globals.pas next >
Pascal/Delphi Source File  |  1988-05-02  |  2KB  |  68 lines

  1. UNIT Globals;
  2.  
  3. INTERFACE
  4.  
  5.     CONST
  6.         rsrc = 'SERL';
  7.         aAbout = 1;
  8.         lastMenu = 408; { number of menus }
  9.         appleMenu = 403; { menu ID for desk accessory menu }
  10.         fileMenu = 404; { menu ID for File menu }
  11.         editMenu = 405; { menu ID for Edit menu }
  12.         baudMenu = 406;
  13.         MessageDialog = 256;
  14.         AboutDialog = 257;
  15.         b300 = 1;
  16.         b1200 = 2;
  17.         b2400 = 3;
  18.         b4800 = 4;
  19.         b9600 = 5;
  20.         b19200 = 6;
  21.         parityMenu = 407;
  22.         noP = 1;
  23.         evenP = 2;
  24.         oddP = 3;
  25.         bitsMenu = 408;
  26.         bData7 = 1;
  27.         bData8 = 2;
  28.         bStop1 = 4;
  29.         bStop15 = 5;
  30.         bStop2 = 6;
  31.  
  32. {- - - - - - - - - - - - - - - - - - - - - - - - serial port - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - }
  33.         inBuffLength = 2048;
  34.  
  35.         XONCHAR = 17;
  36.         XOFFCHAR = 19;
  37.         CrRtn = 13;
  38.         LineFeed = 10;
  39.  
  40.  
  41.     VAR
  42.         myMenus : ARRAY[applemenu..lastMenu] OF MenuHandle;
  43.         dragRect : Rect;
  44.         doneFlag : BOOLEAN;
  45.         myEvent : EventRecord;
  46.         row, rowA, rowB, column, columnA, columnB, code, refNum : INTEGER;
  47.         WindowA, WindowB, theWindow, whichWindow : WindowPtr;
  48.         windowlines, NumWindows, theMenu, theItem : INTEGER;
  49.         Charread : CHAR;
  50.         Urgn : rgnhandle;
  51.         savePort : GrafPtr;
  52.         oneCount : Longint;
  53.  
  54.  
  55. {----------------------- serial port variables ----------------------------}
  56.         inBuffPtr, filterBuffPtr, outBuffPtr : Ptr;
  57.         inBuffPtrA, filterBuffPtrA, outBuffPtrA : Ptr;
  58.         inBuffPtrB, filterBuffPtrB, outBuffPtrB : Ptr;
  59.         inRefNumA, outRefNumA : INTEGER;
  60.         inRefNumB, outRefNumB : INTEGER;
  61.         inRefNum, outRefNum, err : INTEGER;
  62.         serConfig,                           {sum of following vars}
  63.         baud, parity, dataBits, stopBits : INTEGER;
  64.         portA : Boolean;
  65.  
  66. IMPLEMENTATION
  67.  
  68. END.